package com.help10000.rms.ui.adapter;

import android.content.Context;
import android.view.View;

import com.amir.common.beans.TencentMapSearchData;
import com.amir.common.holder.CommonViewHolder;
import com.amir.common.mvp.base.BaseRecyclerAdapter;
import com.help10000.rms.R;

import java.util.ArrayList;
import java.util.List;

public class NavigationSearchAdapter extends BaseRecyclerAdapter<TencentMapSearchData> {
    Context context;
    private List<TencentMapSearchData> data = new ArrayList<>();
    public NavigationSearchAdapter(Context mContext, List<TencentMapSearchData> data,int layoutId) {
        super(mContext,data,layoutId);
        this.context = mContext;
        this.data = data;
    }

    @Override
    protected void bindData(CommonViewHolder holder, TencentMapSearchData data, int position) {
        holder.setText(R.id.tv_name,data.getTitle());
        holder.setOnClickListener(R.id.ll_root, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mOnItemClickListener != null){

                    mOnItemClickListener.onItem(position);
                }
            }
        });
    }
}
